\batchmode

\documentclass[a4paper,11pt]{article}
\RequirePackage{ifthen}




\usepackage{amsmath,amssymb,amsfonts,amsthm,epsfig,bm,xspace,latexsym}
\usepackage{listings,xcolor}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{indentfirst}
\usepackage{tikz}
\usetikzlibrary{shapes,decorations,shadows,arrows,fadings}
\usetikzlibrary{automata,backgrounds,petri}
\usetikzlibrary{shapes.geometric}
\usepackage{enumerate}
\usepackage{zhspacing}
\usepackage{zhfont}
\usepackage[colorlinks,linkcolor=blue]{hyperref}


\lstset{
	basicstyle=\ttfamily\footnotesize ,
	identifierstyle=\ttfamily\footnotesize ,
	keywordstyle=\color[rgb]{0,0.663,0},
	commentstyle=\color{blue},
	%stringstyle=\color{red},
	stringstyle=\color{purple},
	showspaces=false,
	showstringspaces=true,
	tabsize=4,
	rulesepcolor=\color{gray},
	escapeinside=``,
	xleftmargin=1.5em,
	xrightmargin=1.5em,
	aboveskip=1em
}


\lstset{breaklines,extendedchars=false}


\lstnewenvironment{ccode}{\lstset{language={C},numbers=left,numberstyle=\tiny ,frame=shadowbox}}{}
\lstnewenvironment{sccode}{\lstset{language={C},frame=single,basicstyle=\ttfamily\scriptsize ,identifierstyle=\ttfamily\scriptsize }}{}
\lstnewenvironment{makefile}{\lstset{language={[gnu]make},
	frame=single,framerule=0pt,backgroundcolor=\color[rgb]{0.9,0.9,0.9},keywordstyle=\color{black}}}{}
\lstnewenvironment{bash}{\lstset{language={bash},
	frame=single,framerule=0pt,backgroundcolor=\color[rgb]{0.9,0.9,0.9},keywordstyle=\color{black}}}{}%
\providecommand{\lstcomment}[1]{\textcolor{blue}{ #1}}%
\providecommand{\en}[1]{\skipenzh#1\skipenzh{}} 

%
\providecommand{\Title}{LAB 4: 调度器} 


\zhspacing
\pagestyle{fancy}
\lhead{LAB 4: 调度器}
\cfoot{}
\rfoot{Page \skipenzh\thepage\skipenzh{}\ of\ \skipenzh\protect\pageref*{LastPage}\skipenzh{}}

\setlength{\headheight}{16pt} 
%
\renewcommand{\headrulewidth}{0.4pt}
%
\renewcommand{\footrulewidth}{0.4pt}



\newcounter{mycounter} 
%
\newenvironment{myenumerate}{%
	\begin{enumerate}[{Exercise} 1.]
	\setcounter{enumi}{\value{mycounter}}
}%
{%
	\setcounter{mycounter}{\value{enumi}}
	\end{enumerate}
}%
 

\title{\bf {}实验四: 调度器}
\author{}
\date{}




\usepackage[dvips]{color}


\pagecolor[gray]{.7}

\usepackage[]{inputenc}



\makeatletter

\makeatletter
\count@=\the\catcode`\_ \catcode`\_=8 
\newenvironment{tex2html_wrap}{}{}%
\catcode`\<=12\catcode`\_=\count@
\newcommand{\providedcommand}[1]{\expandafter\providecommand\csname #1\endcsname}%
\newcommand{\renewedcommand}[1]{\expandafter\providecommand\csname #1\endcsname{}%
  \expandafter\renewcommand\csname #1\endcsname}%
\newcommand{\newedenvironment}[1]{\newenvironment{#1}{}{}\renewenvironment{#1}}%
\let\newedcommand\renewedcommand
\let\renewedenvironment\newedenvironment
\makeatother
\let\mathon=$
\let\mathoff=$
\ifx\AtBeginDocument\undefined \newcommand{\AtBeginDocument}[1]{}\fi
\newbox\sizebox
\setlength{\hoffset}{0pt}\setlength{\voffset}{0pt}
\addtolength{\textheight}{\footskip}\setlength{\footskip}{0pt}
\addtolength{\textheight}{\topmargin}\setlength{\topmargin}{0pt}
\addtolength{\textheight}{\headheight}\setlength{\headheight}{0pt}
\addtolength{\textheight}{\headsep}\setlength{\headsep}{0pt}
\setlength{\textwidth}{349pt}
\newwrite\lthtmlwrite
\makeatletter
\let\realnormalsize=\normalsize
\global\topskip=2sp
\def\preveqno{}\let\real@float=\@float \let\realend@float=\end@float
\def\@float{\let\@savefreelist\@freelist\real@float}
\def\liih@math{\ifmmode$\else\bad@math\fi}
\def\end@float{\realend@float\global\let\@freelist\@savefreelist}
\let\real@dbflt=\@dbflt \let\end@dblfloat=\end@float
\let\@largefloatcheck=\relax
\let\if@boxedmulticols=\iftrue
\def\@dbflt{\let\@savefreelist\@freelist\real@dbflt}
\def\adjustnormalsize{\def\normalsize{\mathsurround=0pt \realnormalsize
 \parindent=0pt\abovedisplayskip=0pt\belowdisplayskip=0pt}%
 \def\phantompar{\csname par\endcsname}\normalsize}%
\def\lthtmltypeout#1{{\let\protect\string \immediate\write\lthtmlwrite{#1}}}%
\newcommand\lthtmlhboxmathA{\adjustnormalsize\setbox\sizebox=\hbox\bgroup\kern.05em }%
\newcommand\lthtmlhboxmathB{\adjustnormalsize\setbox\sizebox=\hbox to\hsize\bgroup\hfill }%
\newcommand\lthtmlvboxmathA{\adjustnormalsize\setbox\sizebox=\vbox\bgroup %
 \let\ifinner=\iffalse \let\)\liih@math }%
\newcommand\lthtmlboxmathZ{\@next\next\@currlist{}{\def\next{\voidb@x}}%
 \expandafter\box\next\egroup}%
\newcommand\lthtmlmathtype[1]{\gdef\lthtmlmathenv{#1}}%
\newcommand\lthtmllogmath{\dimen0\ht\sizebox \advance\dimen0\dp\sizebox
  \ifdim\dimen0>.95\vsize
   \lthtmltypeout{%
*** image for \lthtmlmathenv\space is too tall at \the\dimen0, reducing to .95 vsize ***}%
   \ht\sizebox.95\vsize \dp\sizebox\z@ \fi
  \lthtmltypeout{l2hSize %
:\lthtmlmathenv:\the\ht\sizebox::\the\dp\sizebox::\the\wd\sizebox.\preveqno}}%
\newcommand\lthtmlfigureA[1]{\let\@savefreelist\@freelist
       \lthtmlmathtype{#1}\lthtmlvboxmathA}%
\newcommand\lthtmlpictureA{\bgroup\catcode`\_=8 \lthtmlpictureB}%
\newcommand\lthtmlpictureB[1]{\lthtmlmathtype{#1}\egroup
       \let\@savefreelist\@freelist \lthtmlhboxmathB}%
\newcommand\lthtmlpictureZ[1]{\hfill\lthtmlfigureZ}%
\newcommand\lthtmlfigureZ{\lthtmlboxmathZ\lthtmllogmath\copy\sizebox
       \global\let\@freelist\@savefreelist}%
\newcommand\lthtmldisplayA{\bgroup\catcode`\_=8 \lthtmldisplayAi}%
\newcommand\lthtmldisplayAi[1]{\lthtmlmathtype{#1}\egroup\lthtmlvboxmathA}%
\newcommand\lthtmldisplayB[1]{\edef\preveqno{(\theequation)}%
  \lthtmldisplayA{#1}\let\@eqnnum\relax}%
\newcommand\lthtmldisplayZ{\lthtmlboxmathZ\lthtmllogmath\lthtmlsetmath}%
\newcommand\lthtmlinlinemathA{\bgroup\catcode`\_=8 \lthtmlinlinemathB}
\newcommand\lthtmlinlinemathB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA
  \vrule height1.5ex width0pt }%
\newcommand\lthtmlinlineA{\bgroup\catcode`\_=8 \lthtmlinlineB}%
\newcommand\lthtmlinlineB[1]{\lthtmlmathtype{#1}\egroup\lthtmlhboxmathA}%
\newcommand\lthtmlinlineZ{\egroup\expandafter\ifdim\dp\sizebox>0pt %
  \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetinline}
\newcommand\lthtmlinlinemathZ{\egroup\expandafter\ifdim\dp\sizebox>0pt %
  \expandafter\centerinlinemath\fi\lthtmllogmath\lthtmlsetmath}
\newcommand\lthtmlindisplaymathZ{\egroup %
  \centerinlinemath\lthtmllogmath\lthtmlsetmath}
\def\lthtmlsetinline{\hbox{\vrule width.1em \vtop{\vbox{%
  \kern.1em\copy\sizebox}\ifdim\dp\sizebox>0pt\kern.1em\else\kern.3pt\fi
  \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}}
\def\lthtmlsetmath{\hbox{\vrule width.1em\kern-.05em\vtop{\vbox{%
  \kern.1em\kern0.8 pt\hbox{\hglue.17em\copy\sizebox\hglue0.8 pt}}\kern.3pt%
  \ifdim\dp\sizebox>0pt\kern.1em\fi \kern0.8 pt%
  \ifdim\hsize>\wd\sizebox \hrule depth1pt\fi}}}
\def\centerinlinemath{%
  \dimen1=\ifdim\ht\sizebox<\dp\sizebox \dp\sizebox\else\ht\sizebox\fi
  \advance\dimen1by.5pt \vrule width0pt height\dimen1 depth\dimen1 
 \dp\sizebox=\dimen1\ht\sizebox=\dimen1\relax}

\def\lthtmlcheckvsize{\ifdim\ht\sizebox<\vsize 
  \ifdim\wd\sizebox<\hsize\expandafter\hfill\fi \expandafter\vfill
  \else\expandafter\vss\fi}%
\providecommand{\selectlanguage}[1]{}%
\makeatletter \tracingstats = 1 
\providecommand{\Beta}{\textrm{B}}
\providecommand{\Mu}{\textrm{M}}
\providecommand{\Kappa}{\textrm{K}}
\providecommand{\Rho}{\textrm{R}}
\providecommand{\Epsilon}{\textrm{E}}
\providecommand{\Chi}{\textrm{X}}
\providecommand{\Iota}{\textrm{J}}
\providecommand{\omicron}{\textrm{o}}
\providecommand{\Zeta}{\textrm{Z}}
\providecommand{\Eta}{\textrm{H}}
\providecommand{\Nu}{\textrm{N}}
\providecommand{\Omicron}{\textrm{O}}
\providecommand{\Tau}{\textrm{T}}
\providecommand{\Alpha}{\textrm{A}}


\begin{document}
\pagestyle{empty}\thispagestyle{empty}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength hsize=\the\hsize}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength vsize=\the\vsize}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength hoffset=\the\hoffset}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength voffset=\the\voffset}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength topmargin=\the\topmargin}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength topskip=\the\topskip}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength headheight=\the\headheight}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength headsep=\the\headsep}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength parskip=\the\parskip}\lthtmltypeout{}%
\lthtmltypeout{latex2htmlLength oddsidemargin=\the\oddsidemargin}\lthtmltypeout{}%
\makeatletter
\if@twoside\lthtmltypeout{latex2htmlLength evensidemargin=\the\evensidemargin}%
\else\lthtmltypeout{latex2htmlLength evensidemargin=\the\oddsidemargin}\fi%
\lthtmltypeout{}%
\makeatother
\setcounter{page}{1}
\onecolumn

% !!! IMAGES START HERE !!!

\stepcounter{section}
\stepcounter{section}
\stepcounter{subsection}
{\newpage\clearpage
\lthtmlfigureA{ccode93}%
\begin{ccode}
struct sched_class {
  // `\textcolor{blue}{ 调度器的名字}`
  const char *name;
  // `\textcolor{blue}{ 初始化运行队列}`
  void (*init) (struct run_queue *rq);
  // `\textcolor{blue}{ 将进程 p 插入队列 rq}`
  void (*enqueue) (struct run_queue *rq, struct proc_struct *p);
  // `\textcolor{blue}{ 将进程 p 从队列 rq 中删除}`
  void (*dequeue) (struct run_queue *rq, struct proc_struct *p);
  // `\textcolor{blue}{ 返回 run-queue 中下一个可执行的进程}`
  struct proc_struct* (*pick_next) (struct run_queue *rq);
  // `\textcolor{blue}{ timetick 处理函数}`
  void (*proc_tick)(struct run_queue* rq, struct proc_struct* p);
};
\end{ccode}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

{\newpage\clearpage
\lthtmlfigureA{ccode101}%
\begin{ccode}
struct proc_struct {
  // `\textcolor{blue}{ \ldots}`
  // `\textcolor{blue}{ 该进程是否需要调度，只对当前进程有效}`
  volatile bool need_resched;
  // `\textcolor{blue}{ 该进程的调度链表结构，该结构内部的连接组成了 run-queue 列表}`
  list_entry_t run_link;
  // `\textcolor{blue}{ 该进程剩余的时间片，只对当前进程有效}`
  int time_slice;
  // `\textcolor{blue}{ round-robin 调度器并不会用到以下成员}`
  // `\textcolor{blue}{ 该进程在优先队列中的节点，仅在 LAB4 使用}`
  skew_heap_entry_t lab4_run_pool;
  // `\textcolor{blue}{ 该进程的调度优先级，仅在 LAB4 使用}`
  uint32_t lab4_priority;
  // `\textcolor{blue}{ 该进程的调度步进值，仅在 LAB4 使用}`
  uint32_t lab4_stride;
};
\end{ccode}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

{\newpage\clearpage
\lthtmlfigureA{ccode111}%
\begin{ccode}
struct run_queue {
  //`\textcolor{blue}{ 其运行队列的哨兵结构，可以看作是队列头和尾}`
  list_entry_t run_list;
  //`\textcolor{blue}{ 优先队列形式的进程容器，只在~LAB4~中使用}`
  skew_heap_entry_t *lab4_run_pool;
  //`\textcolor{blue}{ 表示其内部的进程总数}`
  unsigned int proc_num;
  //`\textcolor{blue}{ 每个进程一轮占用的最多时间片}`
  int max_time_slice;
};
\end{ccode}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{subsection}
\stepcounter{subsection}
{\newpage\clearpage
\lthtmlfigureA{figure125}%
\begin{figure}\centering
\begin{tikzpicture}[scale=2.0,bend angle=10]
	\tikzstyle{every node}=[draw,shape=ellipse,minimum width=2.5cm,fill=white];
	\tikzstyle{note}=[draw=none,above,fill=none,rectangle,minimum width=0pt,opaque]
	%\tikzstyle{note}=[draw=none,above,midway,sloped,fill=none]
	\tikzstyle{blue}=[thick,draw=blue!75]
	\tikzstyle{red}=[thick,draw=red!75,fill=red!10]
	\node[drop shadow] (zombie) at (0,0) {Zombie};
	\node[blue,drop shadow] (unused) at (-2,-0.9) {Unused}
		edge [pre,bend left] node[note] {\footnotesize {由父进程清理}} (zombie);
	\node[drop shadow] (uninit) at (-1.4,-2.2) {Uninit}
		edge [pre,bend left] node[note] {\footnotesize {sys\_fork 创建}} (unused);
	\node[red,drop shadow] (runnable) at (1.4,-2.2) {Runnable}
		edge [pre] node[note, sloped,label=above:\footnotesize {sys\_fork 创建}] {} (uninit);
	\node[red,drop shadow] (running) at (2,-0.9) {Running}
		edge [pre] node[note] {\footnotesize {schedule}} (runnable)
		edge [post,bend right] node[note] {\footnotesize {exit}} (zombie);
	\node[drop shadow] (sleeping) at (4,-1.8) {Sleeping}
		edge [pre,bend right] node[note] {\footnotesize {sleep}} (running)
		edge [post,bend left] node[note] {\footnotesize {wakeup}} (runnable);
	%\draw[dashed] (0.55,-2.7) rectangle (2.8,-0.4);
	\end{tikzpicture}
\end{figure}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{subsection}
{\newpage\clearpage
\lthtmlfigureA{figure150}%
\begin{figure}\centering
\begin{tikzpicture}[scale=2.0,bend angle=30]
	\tikzstyle{every node}=[fill=none,opaque];
	\tikzstyle{red}=[color=red!75];
	\begin{scope}
		\draw [line width=0.5pt,fill=white] (0,0) rectangle (2.6,1.2);
		\draw [line width=0.5pt,fill=white] (0,1.2) rectangle (2.6,3.2);
		\node (kernel1) at (1.35,3) {\small {进程 1 内核空间}};
		\node (user1) at (1.35,1) {\small {进程 1 用户空间}};
		\node [red](trap1in1) at (1.34,2.5) {\footnotesize {保存 trapframe}};
		\node [red](trap1in2) at (1.358,2.3) {\footnotesize {处理 trap}};
		\node [red](trap1in3) at (1.3665,2.1) {\footnotesize {schedule}};
		\node [red](trap1out) at (1.34,1.6) {\footnotesize {恢复 trapframe}};
		\node [red](code1) at (1.342,0.6) {\footnotesize {user code ...}};
		\node [red](int1) at (1.340,0.3) {\footnotesize {trap: interrupt}};
	\end{scope}
	\begin{scope}[xshift=4cm]
		\draw [line width=0.5pt,fill=white] (0,0) rectangle (2.6,1.2);
		\draw [line width=0.5pt,fill=white] (0,1.2) rectangle (2.6,3.2);
		\node (kernel2) at (1.35,3) {\small {进程 2 内核空间}};
		\node (user2) at (1.35,1) {\small {进程 2 用户空间}};
		\node [red](trap2in1) at (1.34,2.0) {\footnotesize {保存 trapframe}};
		\node [red](trap2in2) at (1.36,1.8) {\footnotesize {处理 trap}};
		\node [red](trap2in3) at (1.369,1.6) {\footnotesize {schedule}};
		\node [red](trap2out) at (1.34,2.5) {\footnotesize {恢复 trapframe}};
		\node [red](code2) at (1.342,0.6) {\footnotesize {user code ...}};
		\node [red](int2) at (1.340,0.3) {\footnotesize {trap: interrupt}};
	\end{scope}
	\path[->] (int1)+(-0.6,0) edge[bend left=70,above] node[fill=white] {\tiny {(1)}} (trap1in1)+(-0.6,0);
	\path[->] (trap1out)+(-0.6,-0.15) edge[bend right=50,above] node[fill=white] {\tiny {(6)}} (int1)+(-1,0.1);
	\path[->] (trap1in3)+(+0.4,0) edge[above] node {\tiny {(2)}} (trap2out)+(-0.6,0);
	\path[->] (trap2in3)+(-0.4,0) edge[above] node {\tiny {(5)}} (trap1out)+(-0.6,0);
	\path[->] (int2)+(-0.6,0.1) edge[bend left=50,above] node[fill=white] {\tiny {(4)}} (trap2in1)+(-0.6,0);
	\path[->] (trap2out)+(+0.6,-0.15) edge[bend left=60,above] node[fill=white] {\tiny {(3)}} (int2)+(1,0.1);
\end{tikzpicture}
\end{figure}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{subsection}
\stepcounter{subsubsection}
{\newpage\clearpage
\lthtmlfigureA{figure189}%
\begin{figure}\centering
\begin{tikzpicture}[scale=1.5,->,>=stealth,shorten >=1pt,auto]
	\tikzstyle{every node}=[fill=none,rectangle,minimum width=2cm,minimum height=0.6cm,draw]
	\tikzstyle{note}=[draw=none,above,opaque]
	\node (enqueue) at (0,0) {\scriptsize {enqueue}};
	\node (dequeue) at (2,0) {\scriptsize {dequeue}};
	\node (pick) at (4,0) {\scriptsize {pick\_next}};
	\node (tick) at (6,0) {\scriptsize {proc\_tick}};
	\node (schedule) at (2.5,-1.7) {\scriptsize {schedule}};
	\node (timer) at (4.5,-1.7) {\scriptsize {run\_timer\_list}};
	\node (wakeup) at (0, -3.4) {\scriptsize {wakeup\_proc}};
	\node (fork) at (1.6, -3.4) {\scriptsize {do\_fork}};
	\node (exit) at (3.2, -3.4) {\scriptsize {do\_exit}};
	\node (sleep) at (4.8, -3.4) {\scriptsize {do\_sleep}};
	\node (trap) at (6.4, -3.4) {\scriptsize {trap (时钟中断)}};
	\node (yield2) at (8, -3.4) {\scriptsize {do\_yield}};
	\node[note,color=black] at (-1.5,-0.2) {\scriptsize {sched.c 接口}};
	\node[note,color=black] at (-1.5,-3.6) {\scriptsize {   调度点   }};
	\path[->]   (trap)		edge[above]		(schedule)
                (trap)		edge[above]		(timer)
                (timer)		edge[above]		(tick)
				(sleep)		edge[above]		(schedule)
				(exit)		edge[above]		(schedule)
				(fork)		edge[above]		(enqueue)
				(wakeup)	edge[above]		(enqueue)
				(schedule)	edge[above]		(enqueue)
				(schedule)	edge[above]		(dequeue)
				(schedule)	edge[above]		(pick);
\end{tikzpicture}
\end{figure}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{subsubsection}
{\newpage\clearpage
\lthtmlfigureA{sccode214}%
\begin{sccode}
int kern_main(void)
	void proc_init(void)
    void init_main(void)
		switch_to(c->context, idle->context)
\end{sccode}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

{\newpage\clearpage
\lthtmlfigureA{sccode218}%
\begin{sccode}
void trap(struct trapframe *tf)
    void process_timer_event(void)
	    void sched_class_proc_tick(struct run_queue *rq, struct proc_struct *p)
    void schedule()
        void sched_class_enqueue(struct run_queue *rq, struct proc_struct *p)
        void sched_class_pick_next(struct run_queue *rq)
        void sched_class_dequeue(struct run_queue *rq, struct proc_struct *p)
        switch_to(prev->contex, next->contex)
trapret
\end{sccode}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{subsection}
{\newpage\clearpage
\lthtmlfigureA{makefile226}%
\begin{makefile}
make build-matrix
\end{makefile}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

{\newpage\clearpage
\lthtmlfigureA{makefile228}%
\begin{makefile}
make qemu
\end{makefile}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{subsection}
{\newpage\clearpage
\lthtmlinlinemathA{tex2html_wrap_indisplay868}%
$\displaystyle \mathrm{P.pass} =
\frac{\mathrm{BigStride}}{\mathrm{P.priority}}$%
\lthtmlindisplaymathZ
\lthtmlcheckvsize\clearpage}

{\newpage\clearpage
\lthtmlfigureA{figure251}%
\begin{figure}  \centering
  \begin{tabular}{|c|c|c|}
    \hline
    A.stride (实际值) & A.stride (理论值) & A.pass ( $=\frac{\mathrm{BigStride}}{\mathrm{A.priority}}$\  ) \\
    \hline
    65534 & 65534 & 100 \\
    \hline
    B.stride (实际值) & B.stride (理论值) & B.pass ( $=\frac{\mathrm{BigStride}}{\mathrm{B.priority}}$\  ) \\
    \hline
    65535 & 65535 & 50 \\
    \hline
  \end{tabular}
\end{figure}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{subsection}
{\newpage\clearpage
\lthtmlfigureA{ccode282}%
\begin{ccode}
// `\textcolor{blue}{ 优先队列节点的结构}`
typedef struct skew_heap_entry skew_heap_entry_t;
// `\textcolor{blue}{ 初始化一个队列节点}`
void skew_heap_init(skew_heap_entry_t *a);
// `\textcolor{blue}{ 将节点 b 插入至以节点 a 为队列头的队列中去，返回插入后的队列}`
skew_heap_entry_t *skew_heap_insert(skew_heap_entry_t *a,
                                    skew_heap_entry_t *b,
                                    compare_f comp);
// `\textcolor{blue}{ 将节点 b 插入从以节点 a 为队列头的队列中去，返回删除后的队列}`
skew_heap_entry_t *skew_heap_remove(skew_heap_entry_t *a,
                                    skew_heap_entry_t *b,
                                    compare_f comp);
\end{ccode}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{section}
{\newpage\clearpage
\lthtmlfigureA{bash323}%
\begin{bash}
	grep "LAB4: YOUR CODE" * -ir --color
  \end{bash}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

\stepcounter{section}
\stepcounter{section}
{\newpage\clearpage
\lthtmlfigureA{makefile330}%
\begin{makefile}
make handin
\end{makefile}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

{\newpage\clearpage
\lthtmlfigureA{bash332}%
\begin{bash}
tar jcf lab4-StudentID.tar.bz2 lab4-handin
\end{bash}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}

{\newpage\clearpage
\lthtmlfigureA{bash336}%
\begin{bash}
tar jcf lab4-2008011999.tar.bz2 lab4-handin
\end{bash}%
\lthtmlfigureZ
\lthtmlcheckvsize\clearpage}


\end{document}
